import request from '@/request';
import type {editFormData , addFormData} from '../@types/index';

/**获取我的能力*/
export const getAbility = (params: { page: number, pageSize: number ,ability ?: string}) => {
    return request({
        url: '/api/v2/admin/getAbility',
        method: 'get',
        params
    })
} 

/**添加我的能力*/
export const addAbility = (data: addFormData ) => request({
    url: '/api/v2/admin/addAbility',
    method: 'post',
    data
}) 

/**删除我的能力*/
export const delAbility = (data: { ID: string }) => request({
    url: '/api/v2/admin/delAbility',
    method: 'post',
    data
})

/**更新我的能力*/
export const updateAbility = (data: editFormData) => request({
    url: '/api/v2/admin/updateAbility',
    method: 'post',
    data
})

/**导出我的能力*/
export const exportAbility = () => {
    return request({
        url: '/api/v2/admin/exportAbility',
        method: 'post',
        downFile: true
    })
} 